#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

GNOME_MODULE = cogl

DEB_DH_MAKESHLIBS_ARGS_libcogl20 += -V -- -c4
DEB_DH_MAKESHLIBS_ARGS_libcogl-path20 += -V -- -c4
DEB_DH_MAKESHLIBS_ARGS_libcogl-pango20 += -V -- -c4
DEB_DH_MAKESHLIBS_ARGS_libcogl-gles2-20 += -V -- -c4

DEB_CONFIGURE_EXTRA_FLAGS += \
	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
	--enable-gtk-doc \
	--enable-gdk-pixbuf \
	--enable-cogl-pango \
	--enable-introspection=yes \
	--enable-gl=no

ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),armel armhf))
        DEB_CONFIGURE_EXTRA_FLAGS += --with-default-driver=gles2
else
        DEB_CONFIGURE_EXTRA_FLAGS += --with-default-driver=gl
endif

DEB_CONFIGURE_EXTRA_FLAGS += \
	--enable-xlib-egl-platform=no \
	--enable-cogl-gles2=yes \
	--with-gles2-libname=libGLESv2.so.2 \
	--enable-gles2=yes \
	--enable-gles1=no \
	--enable-cairo=no


ifeq ($(DEB_HOST_ARCH_OS),linux)
DEB_CONFIGURE_EXTRA_FLAGS += \
	--enable-wayland-egl-platform=no \
	--enable-wayland-egl-server=no \
	--enable-kms-egl-platform=no \
	--enable-null-egl-platform
endif

common-binary-predeb-arch:: list-missing
